package com.senven.books.modules.system.log.util;

import com.senven.books.modules.system.log.annotation.SysLogInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author longshengyi
 * @date 2021/8/13 0013
 **/
@Component
public class LogUtil {
    private static final Logger log = LoggerFactory.getLogger(LogUtil.class);

    public LogUtil() {
    }

    @SysLogInfo(
            type = "#type",
            operationType = "#operationType",
            content = "#message"
    )
    public void log(String type, String message) {
        log.info(type + "[" + "一般操作" + "]" + ":" + message);
    }

    @SysLogInfo(
            type = "#type",
            operationType = "#operationType",
            content = "#message"
    )
    public void log(String type, String operationType, String message) {
        log.info(type + "[" + operationType + "]" + ":" + message);
    }
}
